package com.neusoft.yuejian12.yuejian_12.service;

import com.neusoft.yuejian12.yuejian_12.javabean.CommentBean;
import com.neusoft.yuejian12.yuejian_12.javabean.PostBean;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * Created by ZTY on 2017/10/11.
 */

public interface PostService {
    //获取所有帖子列表
    @GET("Post/getPostlist")
    Call<List<PostBean>> getAllPostlist();

    //获取帖子详情
    @GET("Post/getDetail")
    Call<PostBean> getPostDetail(@Query("p_id") int p_id,
                                 @Query("u_id") int u_id);
    //发帖
    @Multipart
    @POST("Post/addpost")
    Call<ResponseBody> addpost(@Query("u_id") int u_id,
                               @Query("p_info") String p_info,
                               @Part MultipartBody.Part file);


}
